<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>优购商城用户注册</title>
<script type="text/javascript" src="Public/uploadify/jquery-1.8.2.min.js"></script>
<script src="Public/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="Public/hdjs/hdjs.css"/>
<!--注册页面css-->
<link rel="stylesheet" type="text/css" href="{{TEMPLATE}}/css/reg.css"/>
<!--点击看不清换一张图片-->
<script type="text/javascript">
	function change(){
		var img=document.getElementById("huanyizhang");
		img.src=img.src+"?";  
	}

</script>
 <script type="text/javascript">
	$(function(){
		//定义异步检测用户名是否存在的请求地址
		var checkRegUser = "{{U('Public/checkRegUser')}}";
		var checkRegCode = "{{U('Public/checkRegCode')}}";
		$('#jsreg').validate({			
			username:{
				//验证规则
				rule:{
					required:true,
					email: true,
					ajax:{url:checkRegUser},					
				},
				error:{
					required:'请输入注册邮箱',
					email: '邮箱格式不正确'
				},
				success:'ok',
				message:''
			},
			password:{
				//验证规则
				rule:{
					required:true,
					regexp: /^[a-zA-Z0-9]\w{5,24}$/
				},
				error:{
					required:'请输入6-25个字符',
					regexp: '请输入6-25个字符'
				},
				success:'ok,继续往下',
				message:''
			},
			passworded:{
				//验证规则
				rule:{
					required:true,
					confirm:'password'
				},
				error:{
					required:'确认密码必填',
					confirm:'两次密码不相同'
				},
				success:'确认密码正确',
				message:''
			},
			code:{
				//验证规则
				rule:{
					required:true,
					ajax:{url:checkRegCode},
				},
				error:{
					required:'请输入验证码',
				},
				success:'ok',
				message:''
			},
		})
	})
</script>
</head>

<body>
	<!--顶部导航-->
	<div id="top_nav">
		<div class="top_ad_center">
			<div class="num1">
				<a href="{{U('Index/index')}}">时尚商城</a>
			</div>

			<!--右侧-->
			<div class="top_ad_right">
				{{if value="isset($_SESSION['username'])"}}
					<div class="top_ad_right1">
						<span>您好，{{substr($_SESSION['username'],0,-7)}}</span>
						<a href="{{U('Public/out')}}" style="color: #666666;" class="out">退出登录</a>
					</div>
				{{else}}
					<div class="top_ad_right1">
						<a href="{{U('Public/login')}}">登陆</a>
						<a href="{{U('Public/reg')}}">注册</a>
					</div>
				{{endif}}
				<div class="top_ad_right2">
					{{if value="isset($_SESSION['username'])"}}
						<a href="{{U('MineYG/index')}}">我的优购</a>
					{{else}}
						<a href="{{U('Public/login')}}">我的优购</a>
					{{endif}}	
				</div>
				<div class="top_ad_right2">
					{{if value="isset($_SESSION['username'])"}}
						<a href="{{U('MineYG/order')}}">我的订单</a>
					{{else}}
						<a href="{{U('Public/login')}}">我的订单</a>
					{{endif}}
				</div>

			</div>
			<!--右侧结束-->
		</div>		
	</div>
	<!--顶部导航结束-->
	<!--新用户注册-->
	<div id="uc_hd">
		<div class="uc_hd_center">
			<h2>新用户注册</h2>
			<p><a href="{{U('Index/index')}}">返回时尚商城</a></p>			
		</div>
	</div>		
	<!--新用户注册结束-->
	<form action="" method="post" id="jsreg">
		<div class="reg">
			<div class="regTabDiv">
				<a href="javascript:;" class="regTab regTabCurr">邮箱注册</a>				
			</div>
			<!--左侧登陆注册区域-->
			<div class="fl nreg_form">
				<dl class="nreg_item mobile_regitem">
					<dd>
						<div class="email">
							<em>*</em>Email:
						</div>
						<div class="email_input">
							<input type="text" name="username" id="" value="" placeholder="请注意输入正确邮箱"/>
						</div>
					</dd>
				</dl>
				<p class="blank15"></p>
				<dl class="nreg_item mobile_regitem">
					<dd>
						<div class="email">
							<em>*</em>密码:
						</div>
						<div class="email_input">
							<input type="password" name="password" id="" value="" placeholder="字母、数字、符号均可，6-25个字符以内"/>
						</div>
					</dd>
				</dl>
				<p class="blank15"></p>
				<dl class="nreg_item mobile_regitem">
					<dd>
						<div class="email">
							<em>*</em>确认密码:
						</div>
						<div class="email_input">
							<input type="password" name="passworded" id="" value=""/>
						</div>
					</dd>
				</dl>
				<p class="blank15"></p>
				<dl class="nreg_item mobile_regitem">
					<dd>
						<div class="email">
							<em>*</em>验证码:
						</div>
						<div class="email_code">
							<input type="text" name="code" id="" value=""/>
							<img src="{{U('Public/code')}}" onclick="this.src=this.src+'&'+Math.random()" id="huanyizhang" style="margin-right: 5px;"/>
							<a href="javascript:change();" class="huanyizhang" style="width: 60px;">换一张</a>
						</div>

					</dd>
				</dl>
				<p class="blank15"></p>
				<p class="blank16">
					<span class="tiaokuan">
						<input type="checkbox" name="rules" id="rules" value="" checked="checked" style="margin-top:0"/>
						<span class="xieyi">我已阅读并同意《<a href="">交易条款协议</a>》</span>
					</span>
					
				</p>
				<p class="reg_btn">
					<a href="javascript:;">
						<input type="submit" name="" id="" value="" />
					</a>
				</p>
			</div>
			<!--右侧-->
			<div class="reg_right">
				<p>已有优购账号，请直接登陆</p>
				<p class="reg_right1"><a href="{{U('Public/login')}}"></a></p>
			</div>
			<!--右侧-->
		</div>
	</form>
		<!--底部-->
	<div class="footer">
		Copyright © 2011-2014 Yougou Technology Co., Ltd. &nbsp;  &nbsp;  
		<a href="">粤ICP备09070608号-4&nbsp;  &nbsp;  
		</a>增值电信业务经营许可证：<a href="">粤 B2-20090203</a>
	</div>
	<!--底部结束-->
</body>
</html>
